package com.zt.dev.numbersimulation.service.impl;

import com.zt.dev.numbersimulation.dao.NumberSimulationRepository;
import com.zt.dev.numbersimulation.pojo.NumberSimulation;
import com.zt.dev.numbersimulation.pojo.Performance;
import com.zt.dev.numbersimulation.service.NumberSimulationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NumberSimulationServiceImpl implements NumberSimulationService {

    @Autowired
    private NumberSimulationRepository simulationRepository;

    @Override
    public boolean addNumberSimulation(NumberSimulation simulation) {
        return simulationRepository.addNumberSimulation(simulation);
    }

    @Override
    public boolean addPerformance(Performance performance) {
        return simulationRepository.addPerformance(performance);
    }

    @Override
    public int updateNumberSimulation(NumberSimulation simulation) {
        return simulationRepository.updateNumberSimulation(simulation);
    }

    @Override
    public List<NumberSimulation> getSimulationByMdelName() {
        return simulationRepository.getSimulationByMdelName();
    }

    @Override
    public List<Performance> getPerformanceByNumberId(int numberId) {
        return simulationRepository.getPerformanceByNumberId(numberId);
    }

    @Override
    public NumberSimulation selSimulationByMdelName(String modelName) {
        return simulationRepository.selSimulationByMdelName(modelName);
    }


}
